package com._04polymorphism;

/**
 * @Author WaveHi
 * @Date 3/8/2021 下午 2:46
 * @Version 1.0
 * @Contact HJBWaveHi@163.com
 * @Description 演示类的继承
 */
public class Teacher extends Person {

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @org.junit.Test
    public void show() {

        super.name = "Tom";
        name = "wow!";
        System.out.println(this.name);
        System.out.println(super.name);

    }

    public void say(String message) {

        System.out.println("Teacher say \"" + message + "\"");

    }




}
